package com.vvv.designpattern.dutychain;

import com.vvv.designpattern.pojo.BusinessLaunch;

import java.util.List;

/**
 * @author vvv
 * @date 2023-11-24 10 18
 * discription 责任链模式旨在将一系列的责任对象连成一个处理链，将请求沿着这条处理链传递，直到有对象处理他为止。
 * ：AbstractBusinessHandler为抽象责任角色，用于定义责任抽象方法，和维护一下个责任节点
 */
public abstract class AbstractBusinessHandler {

    public AbstractBusinessHandler nextHandler;

    public boolean hasNextHandler() {
        return this.nextHandler != null;
    }

    public abstract List<BusinessLaunch> processHandler(List<BusinessLaunch> launchList,
                                                        String targetCity,
                                                        String targetSex,
                                                        String targetProduct);
}
